// 验证码
var BackUrl = "http://localhost:8080";
function flushCode(i) {
    $(i).attr("src", BackUrl + "/code/checkCode?date=" + new Date())// jQuery获取图片
}
// 登录
function login() {
    let data = {
        userCode:$("#userCode").val(),
        password:$("#password").val(),
        code:$("#code").val()
    }
    let result = jsonPost("/user/loginRedis", data);
    console.log(result.result);
    if (result.result == "1") {
        sessionStorage.setItem("userCode",$("#userCode").val());
        window.location.href = "/html/manage.html";
    }else{
        alert(result.result);
        $("#codeImage").attr("src", BackUrl + "/code/checkCode?date=" + new Date());
    }
}


